home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Multimedia / Movie3.0 / Source / xanim / xanim_rle.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-02  |  2.0 KB  |  67 lines

  1.  
  2. /*
  3.  * xanim_rle.h
  4.  *
  5.  * Copyright (C) 1993,1994 by Mark Podlipec. 
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified and redistributed without
  9.  * fee for non-commerical purposes provided that this copyright notice is
  10.  * preserved intact on all copies and modified copies.
  11.  * 
  12.  * There is no warranty or other guarantee of fitness of this software.
  13.  * It is provided solely "as is". The author(s) disclaim(s) all
  14.  * responsibility and liability with respect to this software's usage
  15.  * or its effect upon hardware or computer systems.
  16.  *
  17.  */
  18.  
  19. #include "xanim.h"
  20.  
  21. #define RLE_MAGIC 0xcc52
  22.  
  23. typedef struct RLE_FRAME_STRUCT
  24. {
  25.  ULONG time;
  26.  XA_ACTION *act;
  27.  struct RLE_FRAME_STRUCT *next;
  28. } RLE_FRAME;
  29.  
  30. typedef struct RLE_HDR_STRUCT
  31. {
  32.  ULONG magic;
  33.  ULONG xpos;
  34.  ULONG ypos;
  35.  ULONG xsize;
  36.  ULONG ysize;      
  37.  ULONG flags;      /* misc flags */
  38.  ULONG chan_num;   /* number of channels   */
  39.  ULONG pbits;      /* pixel bits */
  40.  ULONG cmap_num;   /* number of channels with cmaps */
  41.  ULONG cbits;      /* Log2 of cmap length  */
  42.  ULONG csize;      /* size of cmap  */
  43. } RLE_HDR;
  44.  
  45. /* RLE flags definitions */
  46. /* TBD */
  47. #define     RLEH_CLEARFIRST        0x1   /* clear framebuffer flag */
  48. #define     RLEH_NO_BACKGROUND     0x2   /* if set, no bg color supplied */
  49. #define     RLEH_ALPHA             0x4   /* if set, alpha channel (-1) present */
  50. #define     RLEH_COMMENT           0x8   /* if set, comments present */
  51.  
  52.  
  53. #define RLE_RED         0       /* Red channel traditionally here. */
  54. #define RLE_GREEN       1       /* Green channel traditionally here. */
  55. #define RLE_BLUE        2       /* Blue channel traditionally here. */
  56. #define RLE_ALPHA      -1       /* Alpha channel here. */
  57.  
  58. #define RLE_OPCODE(x) ((x) & 0x3f)
  59. #define RLE_LONGP(x)  ((x) & 0x40)
  60. #define RLE_SkipLinesOp        0x01
  61. #define RLE_SetColorOp         0x02
  62. #define RLE_SkipPixelsOp       0x03
  63. #define RLE_ByteDataOp         0x05
  64. #define RLE_RunDataOp          0x06
  65. #define RLE_EOFOp              0x07
  66.  
  67.